class Student:
    def __init__(self, name, sex, age, score):
        self.name = name
        self.sex = sex
        self.age = age
        self.score = score

    def __str__(self):
        return '%s,%s,%d,%d' % (self.name, self.sex, self.age, self.score)


def get_girls(list_target):
    for stu in list_target:
        if '女' == stu.sex:
            yield stu


def get_score(list_target, score):
    for stu in list_target:
        if stu.score > score:
            yield stu


list_stu = [
    Student('张无忌', '男', 28, 82),
    Student('赵敏', '女', 25, 95),
    Student('周芷若', '女', 26, 88)
]

for student in get_girls(list_stu):
    print(student)
print("-------------")
for student in get_score(list_stu, 90):
    print(student)
